using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ImageAnalystTools._Math._Logical
{
    /// <summary>
    /// <para>InList</para>
    /// <para>Determines which values from the first input are contained in a set of other inputs, on a cell-by-cell basis.</para>
    /// <para>逐个单元格确定第一个输入中的哪些值包含在一组其他输入中。</para>
    /// </summary>    
    [DisplayName("InList")]
    public class InList : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public InList()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster_or_constant">
        /// <para>Input raster or constant value</para>
        /// <para><xdoc>
        ///   <para>The input that defines the value that will be looked for in a list of rasters on a cell-by-cell basis.</para>
        ///   <para>A number can be used as an input for this parameter, provided a raster is specified for the other parameter. To specify a number for both inputs, the cell size and extent must first be set in the environment.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于定义将在栅格列表中逐个单元格查找的值的输入。</para>
        ///   <para>如果为其他参数指定了栅格，则可以使用数字作为此参数的输入。要为两个输入指定一个数字，必须首先在环境中设置像元大小和范围。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_raster_or_constants">
        /// <para>Input raster or constant values</para>
        /// <para><xdoc>
        ///   <para>A list of input rasters that the first input will be evaluated against. For each location, if the cell value from the first input exists in any of the other rasters, that value will be assigned to the output raster. If the value does not exist in any of the other rasters, the output value at that location will be NoData.</para>
        ///   <para>A number can be used as an input for this parameter, provided a raster is specified for the other parameter. To specify a number for both inputs, the cell size and extent must first be set in the environment.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将根据其评估第一个输入的输入栅格列表。对于每个位置，如果第一个输入的像元值存在于任何其他栅格中，则该值将分配给输出栅格。如果该值在任何其他栅格中不存在，则该位置的输出值将为 NoData。</para>
        ///   <para>如果为其他参数指定了栅格，则可以使用数字作为此参数的输入。要为两个输入指定一个数字，必须首先在环境中设置像元大小和范围。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para>The output raster.</para>
        /// <para>输出栅格。</para>
        /// </param>
        public InList(object _in_raster_or_constant, List<object> _in_raster_or_constants, object _out_raster)
        {
            this._in_raster_or_constant = _in_raster_or_constant;
            this._in_raster_or_constants = _in_raster_or_constants;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Image Analyst Tools";

        public override string ToolName => "InList";

        public override string CallName => "ia.InList";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster_or_constant, _in_raster_or_constants, _out_raster, _process_as_multiband.GetGPValue()];

        /// <summary>
        /// <para>Input raster or constant value</para>
        /// <para><xdoc>
        ///   <para>The input that defines the value that will be looked for in a list of rasters on a cell-by-cell basis.</para>
        ///   <para>A number can be used as an input for this parameter, provided a raster is specified for the other parameter. To specify a number for both inputs, the cell size and extent must first be set in the environment.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于定义将在栅格列表中逐个单元格查找的值的输入。</para>
        ///   <para>如果为其他参数指定了栅格，则可以使用数字作为此参数的输入。要为两个输入指定一个数字，必须首先在环境中设置像元大小和范围。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster or constant value")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster_or_constant { get; set; }


        /// <summary>
        /// <para>Input raster or constant values</para>
        /// <para><xdoc>
        ///   <para>A list of input rasters that the first input will be evaluated against. For each location, if the cell value from the first input exists in any of the other rasters, that value will be assigned to the output raster. If the value does not exist in any of the other rasters, the output value at that location will be NoData.</para>
        ///   <para>A number can be used as an input for this parameter, provided a raster is specified for the other parameter. To specify a number for both inputs, the cell size and extent must first be set in the environment.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将根据其评估第一个输入的输入栅格列表。对于每个位置，如果第一个输入的像元值存在于任何其他栅格中，则该值将分配给输出栅格。如果该值在任何其他栅格中不存在，则该位置的输出值将为 NoData。</para>
        ///   <para>如果为其他参数指定了栅格，则可以使用数字作为此参数的输入。要为两个输入指定一个数字，必须首先在环境中设置像元大小和范围。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster or constant values")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_raster_or_constants { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para>The output raster.</para>
        /// <para>输出栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Process as multiband</para>
        /// <para><xdoc>
        ///   <para>Specifies how the input multiband raster bands will be processed.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Each band from a multiband raster input will be processed separately as a single band raster. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Each multiband raster input will be processed as a multiband raster. The operation will be performed for each band from one input using the corresponding band number from the other inputs.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何处理输入多波段栅格波段。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中—多波段栅格输入中的每个波段将作为单波段栅格单独处理。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中—每个多波段栅格输入将作为多波段栅格进行处理。将使用来自其他输入的相应频段编号对一个输入的每个频段执行该操作。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Process as multiband")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _process_as_multiband_value _process_as_multiband { get; set; } = _process_as_multiband_value._false;

        public enum _process_as_multiband_value
        {
            /// <summary>
            /// <para>SINGLE_BAND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SINGLE_BAND")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>MULTI_BAND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MULTI_BAND")]
            [GPEnumValue("true")]
            _true,

        }

        public InList SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}